#pragma
#include"Thread.hpp"
class LockGuard
{
public:
    LockGuard(ThreadDate* td):_td(td)
    {
        pthread_mutex_lock(_td->_lock);
    }
    ~LockGuard()
    {
        pthread_mutex_unlock(_td->_lock);
    }

private:
    ThreadDate *_td;
};